package com.cssl.controller;

import com.cssl.service.DtsCouponService;
import com.cssl.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/coupon")
@Api(value = "优惠券接口",tags = "优惠券相关操作")
public class DtsCouponController{
    @Resource
    private DtsCouponService service;
    @PostMapping("/homePageCoupon")
    @ApiOperation(value = "首页优惠券展示",tags = "首页优惠券")
    public Result homePageCoupon(){
        return service.homePageCoupon();
    }


    @PostMapping("/getUserCoupOn")
    @ApiOperation(value = "获得用户所有的优惠券",tags = "用户优惠券")
    public Result getUserCoupOn(){
        return service.getUserCoupOn();
    }

    @PostMapping("/changeCoupon")
    @ApiOperation(value = "用户更改优惠券的选择",tags = "用户优惠券")
    public Result changeCoupon(){
        return null;
    }
}
